package com.kgc.controller;

import com.kgc.util.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 全局异常处理
 *
 */
@ControllerAdvice
public class GlobalExceptionController {

    @ResponseBody
    @ExceptionHandler(value = Exception.class)
    public void handleException(Exception e){
        e.printStackTrace();
    }
}
